<UserControl x:Class="Microsoft.PowerShell.CmdletManagement.ExtendedListBox"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:local="clr-namespace:Microsoft.PowerShell.CmdletManagement"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Name="root" >
    <UserControl.Resources>
        <DataTemplate x:Key="VerbNounTemplate">
            <StackPanel Orientation="Horizontal">
                <TextBlock Width="100" Text="{Binding Path=Name}"></TextBlock>
                <TextBlock Foreground="{DynamicResource HelpTextFontColor}" Text="{Binding Path=Definition}"></TextBlock>
            </StackPanel>
        </DataTemplate>
    </UserControl.Resources>
    <Grid Margin="5,5,15,5">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding Label, ElementName=root}" Margin="0,3,0,0" />
        <ComboBox Name="Items" Grid.Row="0" Grid.Column="1"
                  IsTextSearchEnabled="True" 
                  TextSearch.TextPath="Name"
                  ItemsSource="{Binding}" 
                  SelectedValue="{Binding Path=SelectedValue, ElementName=root}" 
                  SelectedValuePath="Name" 
                  ItemTemplate="{StaticResource VerbNounTemplate}"
                  Margin="0,0,10,0">
        </ComboBox>
        <TextBlock TextWrapping="Wrap" Margin="15,3,0,0" Grid.Row="1" Grid.ColumnSpan="2" Text="{Binding HelpText, ElementName=root}"
			       Foreground="{DynamicResource HelpTextFontColor}"></TextBlock>
    </Grid>
</UserControl>
